def f(x):
	return x * x;


list1 = map(f,[1,2,3,4,5,6])
print(list1)
#输出：
#<map object at 0x00000290B538F1D0>
list2 = list(list1)
print(list2)
#输出：
#[1, 4, 9, 16, 25, 36]

for x in list1:
    print(x)

for x in list2:
    print(x)

#把英文单字的首字母大写
list3 = ['adam', 'LISA', 'barT'];
def format_name(s):
    s1=s[0:1].upper()+s[1:].lower();
    return s1;
list4 = map(format_name,list3)
list5 = list(list4);
print(list5)
#输出：
#['Adam', 'Lisa', 'Bart']